{% extends "base.html" %}
{% load i18n %}
<body>
{% block menu %}
    <li><a href="/">{% trans 'Home' %}</a></li>
    <li><a href="/case/search/">{% trans 'Case Query' %}</a></li>
    <li><a href="/case/add/">{% trans 'Add Case' %}</a></li>
    <li class="cur"><a href="/case/category/" >{% trans 'Category' %}</a></li>
    <li><a href="/contact/">{% trans 'Contact Us' %}</a></li>
{% endblock %}
{% block detail %}
    <div class="main">
        <div class="i_left">
            {% for category,cases in category_cases.items %}
                {% if forloop.counter|divisibleby:"2" %}
                    <div class="listblock">
                        <h2  class="tlt03"><a href="/list/?category={{category.id}}&type=common&no=" target="_blank">{% trans 'More' %}&gt;&gt;</a><span class="cl">{% ifequal LANGUAGE_CODE 'en' %}{{ category.name }}{% else %}{{ category.name_cn }}{% endifequal %}</span></h2>
                        <ul>
                            {% for case in cases %}
                                <li><a href="/case/{{ case.id }}" target="_blank" title="{{ case.name|striptags}}">{{ case.name|striptags }}</a></li>
                            {% endfor %}
                        </ul>
                    </div>
                    </div>
                {% else %}
                    <div class="caseWrap2">
                    <div class="listblock">
                        <h2  class="tlt03"><a href="/list/?category={{category.id}}&type=common&no=" target="_blank">{% trans 'More' %}&gt;&gt;</a><span class="cl">{% ifequal LANGUAGE_CODE 'en' %}{{ category.name }}{% else %}{{ category.name_cn }}{% endifequal %}</span></h2>
                        <ul>
                            {% for case in cases %}
                                <li><a href="/case/{{ case.id }}" target="_blank" title="{{ case.name|striptags}}">{{ case.name|striptags }}</a></li>
                            {% endfor %}
                        </ul>
                    </div>
                {% endif  %}
            {% endfor %}

            </div>
        <div class="i_right">
            <div class="caseWrap2">
                <div class="listblock">
                    <h2 class="h2_tlt"><a href="/list/?category=&type=latest&no=" target="_blank">{% trans 'More' %}&gt;&gt;</a>{% trans 'Latest' %}</h2>
                    <ul>
                        {% for case in latest_cases %}
                            <li><a href="/case/{{ case.id }}" target="_blank" title="{{ case.name|striptags}}">{{ case.name|striptags }}</a></li>
                        {% endfor %}
                    </ul>
                </div>
                <div class="listblock">
                    <h2 class="h2_tlt"><a href="/list/?category=&type=rank&no=" target="_blank">{% trans 'More' %}&gt;&gt;</a>{% trans 'Rank' %}</h2>
                    <ul>
                        {% for case in hotest_cases %}
                            <li><a href="/case/{{ case.id }}" target="_blank" title="{{ case.name|striptags}}">{{ case.name|striptags }}</a></li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block js %}

{% endblock %}
</body>
</html>